<?php 
	session_start();
	if(!$_SESSION['admitido']){
		$error = $_GET['error'];
	
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Agenda del Centro Cultural Universitario </title>
<link href="./css/view.css" rel="stylesheet" type="text/css"/>
<script src="./script/utilidades.js" type="text/javascript"></script>
</head>

<body>
<div id="flash">
    <script>	
        iFlash( "swf/enca_sg.swf", 950, 140 );
    </script> 
<noscript>
    <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="731" height="140">
        <param name="movie" value="swf/enca_sg.swf" />
        <param name="quality" value="high" />
        <embed src="swf/enca_sg.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="731" height="140"></embed>
    </object>
</noscript>
<div id="lineaEncabezado">
</div>
</div>
<div id="login_content">
	<form action="./admin/check_login.php" method="post" name="login" id="login" onsubmit="return ValidarCamposLogin(this);">
    	<fieldset>
        	<legend>Acceso a la Agenda</legend>
            	<span id="mensajeNoAcceso"><?php if($error == 4) echo "Usuario o Contrase&ntilde;a Incorrecta"; else if($error == 5) echo "Ha expirado su sesion";?></span>
                <label for="user">Usuario: </label><input type="text" name="user" id="user" /><span id="mensajeUser" class="mensaje"><?php if($error == 1 || $error == 3) echo "Nombre de Usuario No V&aacute;lido"; ?></span><br />
                <label for="pass">Contrase&ntilde;a: </label><input type="password" name="pass" id="pass"  /><span id="mensajePass" class="mensaje"><?php if($error == 3) echo "Password No V&aacute;lido"; ?></span><br />
                <input type="submit" name="entrar" id="entrar" value="Entrar" class="botonSubmit" />
        </fieldset>
    </form>
</div>
</body>
</html>
<?php 
	}else{
		header("Location: ./admin/listaSalas.php");	
	}
?>
